package ru.ifmo.mlarinsky.classificator.model;

import java.util.HashMap;
import java.util.Map;

public class InstrumentRegister {
    private static final Map<String, Instrument> REGISTER = new HashMap<String, Instrument>();

    private InstrumentRegister() {}

    public static void addInstrument(Instrument instrument) {
        REGISTER.put(instrument.getSymbol(), instrument);
    }

    public static Instrument getInstrument(String symbol) {
        return REGISTER.get(symbol.toUpperCase());
    }
}
